<?php $this->_extends('_layouts/bocib_layout'); ?>

<?php $this->_block('content');?>
<div id="content">
    <?php $file = File::find('file_id = ?', $_GET['file_id'])->query();?>
    <h2>您正在更新文件  : "<?=$file->filename;?>"</h2>
    <p class="jump"><a href="<?=url('bofile/listfile');?>">查看全部已上传文件 >></a></p>
    <div class="tips right20 inline">
        <p>文件名、上传时间不允许修改</p>
        <p>文件大小 <?=$file->size;?></p>
    </div>
    <form action="<?=url('bofile/editFile');?>" method="post" enctype="multipart/form-data">
        <div>
            <input type="hidden" name="file_id" value="<?=$_GET['file_id'];?>" />
            <label for="ctgry_id">选择分类: </label>
            <select name="ctgry_id" id="ctgry_id">
                <option value="<?=$file->category_id;?>" selected="selected">当前为"<?=$file->category->category ;?>"</option>
                <?php foreach(FileCategory::find('parent_id = 3')->all()->query() as $fileCtgry) { ?>
                <option value="<?=$fileCtgry->id;?>"><?=$fileCtgry->category;?></option>
                <?php } ?>
            </select><br />
            <label for="description">更新描述:<span class="stips">(当鼠标悬停于文件名时出现，可留空)</span></label>
            <textarea name="description" id="description" rows="100" cols="100"><?=$file->description;?></textarea><br />
            <input type="submit" value="提交" />
        </div>
    </form>
</div>
<?php $this->_endblock('content');?>